<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title>My Personal Blog</title>
    <%= stylesheet_link_tag 'blog', :media => "all" %>
  </head>
  <body id="store">
    <div id="banner">
      <img src="/images/logo.png">
      <%= @page_title || "My Personal Blog" %>
    </div>
    <div  id="columns">
      <div id="side">
        <%= link_to "Post List", posts_url %><br>
        <%= link_to "category List", categories_url %><br>
        <%if session[:user_id] != nil %>
        	<br>
        	<%= link_to "Back Page", admin_posts_url %><br>
        	<%= link_to "Log Out", :controller => 'login', :action => 'logout' %><br>
        <%else  session[:user_id] == nil %>
        	<%= link_to "Log In", :controller => 'login', :action => 'login' %><br>
        <%end %>
      </div>
      <div id="main">
        <%= yield %>
      </div>
    </div>
    <div id="banner">
      <%= @page_title  %>
    </div>
  </body>
</html>
